package com.doyens.gmall.all.controller;

import com.doyens.gmall.model.product.SkuInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

/**
 * Classname:CartController
 * PackageName:com.doyens.gmall.all.controller
 *
 * @Author:uyijk
 * @Create:2023/8/8 11:06
 * @Version: 1.0
 */
@Controller
public class CartController {

    @RequestMapping("/addCart.html")
    public String addCart(@RequestParam(name = "skuId") Long skuId,
                          @RequestParam(name = "skuNum") Integer skuNum,
                          HttpServletRequest request){
        //TODO: feign远程调用cart
        SkuInfo skuInfo=null;
        request.setAttribute("skuInfo",skuInfo);
        request.setAttribute("skuNum",skuNum);
        return "cart/addCart";
    }
}
